package com.iris.live.services.report.data.orgline;

import com.iris.live.services.report.data.ColumnUnit;

/**
 * @Description:组织架构单元定义
 * @author: Tony.Zhang
 * @Date: 2017-08-15 21:36
 **/
public class OrgUnit extends ColumnUnit {
    private OrgType    type;  //类型
    private String     orgColumn; //记录中对应的数据库字段名

    public OrgUnit(OrgType type, String value, String orgColumn,Integer displayRowOrder ) {
        this(type, value.replaceAll("[+]|[-]","_"), value, orgColumn,displayRowOrder);
        //this(type, value, value, orgColumn,displayRowOrder);
    }
    public OrgUnit(OrgType type, String value, String text, String orgColumn, Integer displayRowOrder) {
        super(value, text, displayRowOrder);

        this.type = type;
        this.orgColumn = orgColumn;
    }

    public OrgType getType() {
        return type;
    }

    public String getOrgColumn() {
        return orgColumn;
    }

    public enum OrgType {GROUP, BIGAREA, SMALLAREA, CTA, PERMIT}
}
